﻿$(function () {
    //閲嶈閫氱煡寮圭獥 start
    $("#service_msg").click(function () {
        var _thissuccess = layer.open({
            type: 1,
            area: ["700px", 'auto'],
            title: false,
            closeBtn: 0,
            shadeClose: true,
            resize: false,
            content: $("#msg_popup"),
            success: function () {
                $(".msg_pop_close").click(function () {
                    layer.close(_thissuccess);
                });
            }
        });
    });
    //閲嶈閫氱煡寮圭獥 end
});
window.onload = function () {
    //绗竴澶╄闂紝鑷姩寮瑰嚭
    var notic_important = Tools.cookie.get("read_notic_important");
    if (notic_important != null && typeof (notic_important) != "undefined") {
        // nothing
    } else {
        let allowDate = $("#msg_popup").attr("data-times");
        allowDate = Tools.formatDate(allowDate);
        if (allowDate != null) {
            if ((new Date()) <= allowDate) {
                var _thissuccess = layer.open({
                    type: 1,
                    area: ["700px", 'auto'],
                    title: false,
                    closeBtn: 0,
                    shadeClose: true,
                    resize: false,
                    content: $("#msg_popup"),
                    success: function () {
                        $(".msg_pop_close").click(function () {
                            layer.close(_thissuccess);
                        });
                        Tools.cookie.set("read_notic_important", "1", 2);
                    }
                });
            }
        }
    }
}